package cn.qf.v2;

public class Truck extends Vehicle {
    // 吨位
    private String load;

    public Truck(String name, String load) {
        super(name);
        this.load = load;
    }

    public Truck(String name, String load, int oil, int loss) {
        super(name, oil, loss);
        this.load = load;
    }

    public String getLoad() {
        return load;
    }

    public void show() {
        System.out.println("=====卡车=====");
        System.out.println("车名：" + getName());
        System.out.println("吨位：" + load);
        System.out.println("油量：" + getOil());
        System.out.println("损耗度：" + getLoss());
        System.out.println("=============");
    }
}
